# vim:ts=4:sw=4:noet:
""" Method Info dialog """

import wx
from c.ui.wxw.editor import Editor

class GetInfoMethodDialog(wx.Dialog):
	def __init__(self, *args, **kwds):
		# begin wxGlade: GetInfoMethodDialog.__init__
		kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.THICK_FRAME
		wx.Dialog.__init__(self, *args, **kwds)
		self.window_1 = wx.SplitterWindow(self, -1, style=wx.SP_LIVE_UPDATE)
		self.window_1.SetSashGravity(1.0)
		self.panelLiterals = wx.Panel(self.window_1, -1)
		self.panelBytecodes = wx.Panel(self.window_1, -1)
		self.lblHdrSignature = wx.StaticText(self, -1, "Signature:")
		self.lblSignature = wx.StaticText(self, -1, "")
		self.lblHdrInClass = wx.StaticText(self, -1, "In Class:")
		self.lblInClass = wx.StaticText(self, -1, "")
		self.lblHdrStatus = wx.StaticText(self, -1, "State:")
		self.lblState = wx.StaticText(self, -1, "Compiled")
		self.static_line_1 = wx.StaticLine(self, -1)
		self.lblHdrBytecodes = wx.StaticText(self.panelBytecodes, -1, "Bytecodes:")
		self.lblByteInfo = wx.StaticText(self.panelBytecodes, -1, "")
		self.textBytecodes = Editor(self.panelBytecodes)
		self.panelBytecodes.SetMinSize((250,150))
		self.lblHdrLiterals = wx.StaticText(self.panelLiterals, -1, "Literals:")
		self.lblLitInfo = wx.StaticText(self.panelLiterals, -1, "")
		self.listLiterals = wx.ListBox(self.panelLiterals, -1, choices=[])

		self.__set_properties()
		self.__do_layout()
		# end wxGlade

	def __set_properties(self):
		# begin wxGlade: GetInfoMethodDialog.__set_properties
		self.SetTitle("Method - ")
		ft = self.lblSignature.GetFont()
		newft = wx.Font(ft.GetPointSize(), wx.DECORATIVE, wx.NORMAL, wx.BOLD, 0, ft.GetFaceName())

		self.lblHdrSignature.SetFont(newft)
		self.lblHdrInClass.SetFont(newft)
		self.lblHdrStatus.SetFont(newft)
		self.lblHdrBytecodes.SetFont(newft)
		self.lblHdrLiterals.SetFont(newft)
		# end wxGlade

	def __do_layout(self):
		# begin wxGlade: GetInfoMethodDialog.__do_layout
		self.mainSizer = wx.BoxSizer(wx.VERTICAL)
		sizer_8 = wx.BoxSizer(wx.VERTICAL)
		sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
		sizer_7 = wx.BoxSizer(wx.VERTICAL)
		sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
		grid_sizer_1 = wx.FlexGridSizer(3, 2, 5, 5)
		grid_sizer_1.Add(self.lblHdrSignature, 0, wx.ALIGN_RIGHT, 0)
		grid_sizer_1.Add(self.lblSignature, 0, wx.EXPAND, 0)
		grid_sizer_1.Add(self.lblHdrInClass, 0, wx.ALIGN_RIGHT, 0)
		grid_sizer_1.Add(self.lblInClass, 0, wx.EXPAND, 0)
		grid_sizer_1.Add(self.lblHdrStatus, 0, wx.ALIGN_RIGHT, 0)
		grid_sizer_1.Add(self.lblState, 0, wx.EXPAND, 0)
		self.mainSizer.Add(grid_sizer_1, 0, wx.ALL|wx.EXPAND, 5)
		self.mainSizer.Add(self.static_line_1, 0, wx.EXPAND, 0)
		sizer_2.Add(self.lblHdrBytecodes, 0, wx.TOP|wx.BOTTOM, 5)
		sizer_2.Add(self.lblByteInfo, 0, wx.LEFT|wx.TOP|wx.BOTTOM, 5)
		sizer_7.Add(sizer_2, 0, wx.EXPAND, 0)
		sizer_7.Add(self.textBytecodes, 1, wx.BOTTOM|wx.EXPAND, 5)
		self.panelBytecodes.SetSizer(sizer_7)
		sizer_3.Add(self.lblHdrLiterals, 0, wx.TOP|wx.BOTTOM, 5)
		sizer_3.Add(self.lblLitInfo, 0, wx.LEFT|wx.TOP|wx.BOTTOM, 5)
		sizer_8.Add(sizer_3, 0, wx.EXPAND, 0)
		sizer_8.Add(self.listLiterals, 1, wx.EXPAND, 0)
		self.panelLiterals.SetSizer(sizer_8)
		self.window_1.SplitHorizontally(self.panelBytecodes, self.panelLiterals)
		self.mainSizer.Add(self.window_1, 1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 5)
		self.SetSizer(self.mainSizer)
		self.mainSizer.Fit(self)
		self.Layout()
		# end wxGlade


# end of class GetInfoMethodDialog

